package com.youlu.campus.entity;

import com.youlu.campus.base.base.EntityBase;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 用户活动积分/活力值明细表
 */
@Getter
@Setter
@Document(collection = "user_activity_point_detail")
public class UserActivityPointDetail extends EntityBase {
    @Indexed
    private String userId;
    @Indexed
    private String activityId;

    private Integer points;
    /**
     * 消耗类型,add:累加积分,sub:消耗积分
     */
    private String action;
    /**
     * vote:投票,
     * vote-receive:投票领取,
     * vote-expire:投票过期
     * 业务类型,qa:每日知识挑战 invite:邀请,ad:看广告,
     * sign-up:签到,share-mini:分享小程序 ,
     * ca-receive-digit:电子证书领取,ca-receive-paper:纸质证书领取
     * learning:每日学习,praxis:实践行动,work-collection:作品征集,
     * join-qq-group:活动QQ群，outer-task:任务,subscription:订阅通知
     */
    @Indexed
    private String bizType;
    /**
     * 日期
     */
    private Date optDate;
    /**
     * 业务描述
     */
    private String bizDesc;
    /**
     * 备注
     */
    private String comments;

    @Transient
    private UserPO userPO;

    private String taskId;
}
